﻿using FellowshipOne.API;

namespace MasVida.WebApi.Models.DataObject
{
    public class OAuthTicketDo
    {
        public OAuthTicketDo()
        {
            
        }

        public OAuthTicketDo(F1OAuthTicket ticket)
        {
            PersonUrl = ticket.PersonURL;
            ChurchCode = ticket.ChurchCode;
            ConsumerKey = ticket.ConsumerKey;
            ConsumerSecret = ticket.ConsumerSecret;
            AccessToken = ticket.AccessToken;
            AccessTokenSecret = ticket.AccessTokenSecret;
        }

        public F1OAuthTicket GetF1OAuthTicket()
        {
            return new F1OAuthTicket()
            {
                AccessToken =  AccessToken,
                AccessTokenSecret = AccessTokenSecret,
                ChurchCode = ChurchCode,
                ConsumerKey = ConsumerKey,
                ConsumerSecret = ConsumerSecret,
                PersonURL = PersonUrl
            };
        }

        public string PersonUrl { get; set; }
        public string ChurchCode { get; set; }
        public string ConsumerKey { get; set; }
        public string ConsumerSecret { get; set; }
        public string AccessToken { get; set; }
        public string AccessTokenSecret { get; set; }

    }
}
